package com.ljx.recruitment.interview.controller;

import com.ljx.recruitment.common.domain.vo.resp.ApiResult;
import com.ljx.recruitment.common.domain.vo.resp.PageResp;
import com.ljx.recruitment.interview.domain.vo.req.DeliverPageReq;
import com.ljx.recruitment.interview.domain.vo.resp.DashboardDeliverTrendResp;
import com.ljx.recruitment.interview.domain.vo.resp.DashboardDetailResp;
import com.ljx.recruitment.interview.domain.vo.resp.DashboardJobCategoryResp;
import com.ljx.recruitment.interview.service.DashboardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-11-02  00:06
 */
@Api(tags = "桌面接口")
@RestController
@RequestMapping("/dashboard")
public class DashboardController {

    @Autowired
    private DashboardService dashboardService;

    @ApiOperation("查询桌面详情信息")
    @GetMapping("/details")
    public ApiResult<DashboardDetailResp> getInfo() {
        return ApiResult.success(dashboardService.getInfo());
    }

    @ApiOperation("查询桌面简历投递趋势")
    @GetMapping("/deliver/trend")
    public ApiResult<DashboardDeliverTrendResp> getDeliverTrend(@RequestParam("time") String time) {
        return ApiResult.success(dashboardService.getDeliverTrend(time));
    }


    @ApiOperation("查询桌面职位分类")
    @GetMapping("/job/category")
    public ApiResult<List<DashboardJobCategoryResp>> getJobCategory() {
        return ApiResult.success(dashboardService.getJobCategory());
    }

}
